var SecondScene=SecondScene||{};
SecondScene.SecondScene=function(){
	var s = this;
	F2xContainer.call(s);
	s.initUI();
	s.RootMC.RunMC.addEventListener(annie.Event.CALL_FRAME,function(e){
		if(e.data.frameName=="D1"){
            s.RootMC.RunMC.stop();
            CountS.stopTime();
            //播放动画
			var isFirst=false;
            s.RootMC.addEventListener(annie.MouseEvent.MOUSE_DOWN,function () {
                s.RootMC.RunMC.play();
                CountS.musicBtn.open.visible=true;
                CountS.musicBtn.close.visible=false;
                CountS.runTime(1);
                if(!isFirst){
                    BgIndex=1;
                	BgOne.play(0,999);
                    CountS.musicBtn.open.visible=true;
                	isFirst=true;
				}
            });
            //暂停动画
            s.RootMC.addEventListener(annie.MouseEvent.MOUSE_UP,function () {
                s.RootMC.RunMC.stop();
                CountS.stopTime();
            });
		}

	});
	s.RootMC.RunMC.addEventListener(annie.Event.END_FRAME,function () {
		s.nextScene();
	})
    // s.RootMC.RunMC.addEventListener(annie.MouseEvent.CLICK,function () {
    //     s.nextScene();
    // })
    // var SceneList1=["FiveScene","SixScene","SevenScene","EightScene","NineScene"];
    // var SceneList=["SixScene","CountScene"]

    // Flash2x.loadScene(SceneList1,function (p) {
     //    //加载进度
    // },function (res) {
     //    if(res.sceneId==res.sceneTotal){
     //    	trace("第二次加载完成");
	// 	}
	// });
};
F2xExtend(SecondScene.SecondScene,F2xContainer);
SecondScene.SecondScene.prototype.nextScene=function () {
	var s = this;
    RootStage.addChild(new ThreeScene.ThreeScene());
    RootStage.removeChild(s);
}
SecondScene.SecondScene.prototype.initUI=function(){
	var s = this;
	//f2x_auto_created_init_start
	var _d0=new SecondScene.F2xAuto_69();
	_d0.name="RootMC";
	s.RootMC=_d0;
	Flash2x.d(_d0,{y:0.85});
	s.addChild(_d0);
	//f2x_auto_created_init_end
	
};
